For goods, account books, cards, etc., which are present code recording mediums, information expressed by two magnetical or optical states is coded and recorded by combinations thereof. Representatives of these recorded codes and magnetic cards, and bar code labels, etc. can be cited. All of these codes are so constructed that various sorts of information are expressed by combining the two recorded states and decoded. For example, the bar code optically displayed on the surface of the medium of bar code labels, account books, etc. is expressed by the difference between two reflection coefficients of the ground color in the display region and the printed bar in the same region. A plurality of widths of the bars and the spaces in the bar code, which have a different reflection coefficient, express various sorts of coded information by their combinations.
The bar code expressed optically is relatively simple with respect to account books or labels and is used frequently with a bar code printer for labels and account books, to print bar codes thereon at a place close to a job site. On the other hand, for a code reading device for reading out bar codes, for which the job sites of the reading operation are scattered, a portable hand wand type scanner disclosed e.g. in JP-B-63-60,435 (JP-A-56-140,467; corresponding U.S. Pat. Nos. 4,387,297, 4,496,831 and 4,593,186) is convenient.
For detection of this kind of scanners there are the CCD light receiving type, the laser scanner type, etc., in which the medium is excited by irradiation light and having a detection position to where light reflected by the medium is forwarded. The reading characteristics of this kind of code reading devices are influenced by 3 factors including the state of the light emitting and the light receiving element in the code reading device, the state of operation from the light emitting and the light receiving element to the medium, and the state of representation on the medium. The hand wand type bar code scanner of the laser scanning type is popular because it can read out the bar code without contact and a bar code representation having a large width can be read out.
In a bar code scanner using the method, by which the bar code is scanned with a laser beam to be read out. There is a mechanism called an autofocus, by which the focusing position of the optical system is variable, to improve operability by increasing the readable region. In this way a wider region is readable than with a fixed focus.
A prior art technique using a laser scanner having such an autofocus mechanism will be explained below, referring to FIGS. 14 to 16.
FIG. 14 is a perspective view illustrating the state where the bar code is read out by the laser scanner; FIG. 15 is a scheme showing the arrangement of various parts for explaining the reading resolving power of the laser scanner; and FIGS. 16(a) to 16(d) are schemes illustrating the reading operation of the laser scanner.
In the figures reference numeral 801 is a laser scanner; 802 is a bar code representation; 8011 is a scanner case; 8012 is a semiconductor laser; and 8013 is an optical system.
As indicated in FIG. 14, the reading operation is effected by locating the laser scanner 801 so as to be opposite to the bar code representation 802. In the case where the optical system in the laser scanner 801 has a fixed focus, the laser scanner 802 and the bar code representation 802 should be located, opposite to each other so that the distance therebetween, i.e. the read distance D, is so set that the bar code representation 802 is located within the focus depth, i.e. the read distance.
Such a laser scanner 801 is provided, as indicated in FIG. 15, with the semiconductor laser 8012 disposed in the scanner case 8011 thereof and the optical system (objective lens) 8013 for focusing the laser beam emitted by this semiconductor laser 8012.
The laser beam emitted by this semiconductor laser 8012 is focused by the optical system 8013 at a focusing point 8013. The neighborhood of this focusing point F is a high resolution range, where fine codes can be read out, and with increasing distance from the focusing point F only codes of increasing size can be read out, from a middle resolution range to a low resolution range.
With respect to this focusing point, the diameter of the laser beam is smallest at the focusing point and increases with increasing distance therefrom.
As indicated in FIG. 16(a), the bar code recorded in the bar code representation 802, where the spot of the laser beam is formed, is expressed in a code by combining bars (black) and spaces (white). In the structure indicated in the figure the bar code is expressed in two-valued levels of narrow bar/wide bar and wide bar/wide space. As indicated in the figure, a void B, a deficiency C or dirt may exist, depending on the printing and the state of the surface of the medium. In the case where a bar code having such problems is scanned with the laser beam at a scan position CS indicated in the figure, a light reception signal obtained from the light receiving element is somewhat distorted, as indicated in FIG. 16(b), when the spot has a middle size, and when the size of the spot is smallest, the waveform varies due to the void B and the deficiency C, as indicated in FIG. 16(c). Further, when the size of the spot is great, the waveform varies, as indicated in FIG. 16(d), depending on the focused spot size, where it is extremely distorted so that the binary processing is difficult. In the case of this bar code representation correct decoding is possible in the state where the spot has a middle size, as indicated in FIG. 16(b). In the case where the size of the spot is smallest, as indicated in FIG. 16(c), the levels of the waveform corresponding to the positions of the void B and the deficiency C are lowered and shifts A and B are produced, which prevents correctly the bar code. Further, in the case where the spot has a great size, as indicated in FIG. 16(d), the ability to follow the bar code pattern and the output waveform is impacted on the whole so as to be dull, which makes the decoding operation extremely difficult.
A scanner provided with an autofocus mechanism, which measures the distance between the medium and the scanner and adjusts the focusing point so as to be on the surface of the bar code representation, moves the optical system 8013 on the basis of the measured distance and adjusts automatically the focus.
A light reception signal obtained by the scanner is binary processed. The decoding processing is effected, as described in detail in Japanese in "Formation of Bar Code System", separate volume of Transistor Technique, Sensor Interfacing, No. 4, published by CQ Publishing Company, Jul. 1, 1984, pp. 197 to 199.
FIG. 17 is a circuit diagram showing the construction of the principal part of a semiconductor laser driving circuit of the coding device according to the prior art technique, in which De is a laser diode; 72 is an NPN type transistor driving the laser diode; 73 is a current limiting resistance; 74 is controller; 75 is an NPN type transistor used for the operation of protecting the laser diode De; and 76 is an initiation detection section.
In FIG. 17, the transistor 72 and the resistance 73, which control the driving current necessary for obtaining a predetermined light intensity from the diode De are connected in series with the laser diode De, and the output of the controller 74 for controlling this driving current is supplied to the base of the transistor 72 serving as the control terminal thereof.
The intensity of the light emitted by the laser diode De is controlled by the intensity of the driving current corresponding to the value of the impedance between the collector and the emitter of the transistor 72, depending on the output value of the controller 74, to which an emitted light intensity setting signal is supplied from the exterior.
However, with construction described above, the laser diode De can be destroyed by surge current produced at the switching-on of the power source. As a measure to prevent this the collector-emitter circuit of the transistor 75 for protecting is inserted in series in the series circuit consisting of the laser diode De, the collector-emitter circuit of the transistor 72 and the resistance 73, so that the time the power source is switched-on is detected and the impedance between the collector and the emitter of the transistor 75 is lowered relatively slowly in a predetermined time. In this way the driving current is increased gradually so as to delay the usual lighting operation so that a so-called slow start operation is effected.
In this kind of code reading device, in the case where it is so constructed that the protecting operation for the semiconductor laser driving circuit is effected and the voltage varying, dependent on the environment, is compared with a reference voltage, the result obtained by the comparison being held, the circuit is so constructed that a device having the holding function such as a thyristor, a flipflop, etc. is connected with the output of a comparator effecting the operation of comparing the varying voltage with the reference voltage.
Such a prior art comparator circuit with latch will be explained referring to FIG. 18.
FIG. 18 is a scheme illustrating the construction of such a prior art comparator circuit with latch.
In FIG. 18 reference numeral 51 is a comparator circuit; 52 is a thyristor circuit; 53 is an input terminal; and 54 is a reference voltage power source.
The input voltage Vin to in the input terminal 53, which is the voltage to be compared, is applied to the non-inverting input terminal + of the comparator circuit 51 and compared with the reference voltage Vref of the reference voltage power source 54 applied to the inverting input terminal - of the comparator circuit 54. If the relation; EQU input voltage Vin&gt;reference voltage Vref
is valid, the output voltage Vout from the output terminal of the comparator circuit 51 is changed to the "H" level and the output voltage Vout of "H" level is applied to the gate terminal of the thyristor 52 through the current limiting resistance. In this way the impedance of the anode and the cathode of the thyristor 52 is turned on to a very low state. This state is held, until the voltage applied to the anode and the cathode of the thyristor 52 not shown in the figure is reset so that it is lowered to a value under a predetermined voltage.
Further, in this holding structure, a flipflop circuit is disposed in lieu of the thyristor 52 so that the holding operation is effected according to the output voltage Vout of "H" level and that the holding state is reset by the reset terminal of the flipflop circuit. The protecting operation for the semiconductor laser illuminating the optical recording medium can be carried out by the operation for comparing, holding and resetting.
In this kind of code reading device, because of fluctuations in the distance between the medium and the light receiving element and the angle corresponding to the operation state as well as the ground color and the reflection coefficient of the medium corresponding to the representation state, the detection light intensity arriving at the light receiving element varies significantly, which gives rise to undulations or differences in the height in the signal of amplitude obtained from the light receiving element. In order to obtain a rectangular pulse by amplifying this signal of amplitude for the purpose of the digital processing thereof, it is necessary to widen the dynamic range of the amplifying circuit. Amplifying circuits having a wide dynamic range there are generally known those effecting automatic gain control (AGC) and those effecting logarithmic curve amplification (Log AMP). These are not used in practice for the reason stated in the next paragraph, but since a measurement is taken by using the waveform processing such as a clamping circuit, the number of operations necessary for a success of the reading increases naturally and the recording state of the recording medium is restricted.
However the prior art code reading device explained above, referring to FIGS. 14 to 16(d), has a problem that since it is so constructed that the focusing point is moved automatically on the basis of the distance between the recording medium and the scanner, in many cases the adjusted focusing point is not always in accordance with a readable position because of fluctuations in the state of representation of the code or the state of the surface of the recording medium.
A first object of the present invention is, therefore, to provide a code reading device which can read the code at the adjusted focusing point and effect the reading in spite of fluctuations in the representation and the recording medium so that a high reading probability can be obtained.
However the prior art code reading device explained above, referring to FIG. 17, has a problem that it is impossible to obtain any semiconductor laser driving construction which will work at a low power source voltage, because the transistor 72 for current driving the laser diode De, the transistor 75 for the protection operation and the current limiting resistance 73 are connected in series and therefore a power source voltage, which is higher by an amount twice as high as the voltage across the emitter-collector circuit, is required in the usual operation.
A second object of the present invention is, therefore, to provide a code reading device having a semiconductor laser driving construction so formed that the destruction of the laser diode De is prevented.
However in the prior art code reading device explained above, referring to FIG. 18, an inconvenience is produced, in the case where it is required to increase the integration density and to reduce the size, because devices, which are difficult to mount on an analogue IC or a small scale wiring board, such as thyristors, flipflops, etc. are used apart from the comparator for the purpose of holding the result of comparison by means of the comparator circuit 51. Further the circuit is complicated, because reset means for lowering the voltage between the anode and the cathode is required in the case where a thyristor is used, which is reset by turning-off, and the intensity of the conduction current between the anode and the cathode is so controlled that it is lower in the continuous holding state thereof than in the holding starting state.
A third object of the present invention is, therefore, to provide a comparator circuit with a latch having a high integration density and a small size.
However, in an amplifying circuit effecting the automatic gain control (AGC) described above, distortions are produced because the initial amplitude of the supplied detection signal corresponds to the rise of the represented code digital, which is not suitable for the detection and the processing of digital codes such as the bar code. Further in an amplifying circuit effecting the logarithmic curve amplification (Log AMP) described above, since the amplification characteristic curve is a logarithmic curve, if there are distortions in the supplied detection signal, the code reading device has a property that the reading is impossible in practice, which is basically unsuitable.
A fourth object of the present invention is, therefore, to provide a code reading device in which the number of detecting operations is small and which can measure a wide representation state of the recording medium.